import pytest
import requests

from config import HEADERS, BASE_URL


@pytest.fixture
def get_token():
    data = {"username": "admin", "password": "123456"}
    # headers={}
    resp = requests.post(url=BASE_URL + "/login", data=data)
    token = resp.json()['Authorization']
    HEADERS['Authorization'] = token
    # yield    headers


